<?php

namespace Admin\Model;

use Think\Model\RelationModel;

class NodeModel extends RelationModel
{
    protected $_link = array(
        'node' => array(    //关联到哪个表---注意大小写
            'mapping_type'      =>  self::HAS_MANY,
            'mapping_name'       =>  'node',  //显示名称
            'mapping_order'   =>   'sort',
            'parent_key'    =>  'pid', //字段
        ),
    );
}
